<%--<%@ page import="java.util.List" %>&lt;%&ndash;--%>
<%--  Created by IntelliJ IDEA.--%>
<%--  User: Administrator--%>
<%--  Date: 2025/5/31--%>
<%--  Time: 下午9:21--%>
<%--  To change this template use File | Settings | File Templates.--%>
<%--&ndash;%&gt;--%>
<%--<%@ page contentType="text/html;charset=UTF-8" language="java" %>--%>
<%--<html>--%>
<%--<head>--%>
<%--    <title>错误</title>--%>
<%--    <style>--%>
<%--        body { font-family: Arial, sans-serif; margin: 40px; }--%>
<%--        .error-section { margin-bottom: 30px; padding: 15px; border: 1px solid #ddd; }--%>
<%--        h2 { color: #d9534f; }--%>
<%--    </style>--%>
<%--</head>--%>
<%--<body>--%>
<%--<div class="error-section">--%>
<%--    <h2>发生错误！</h2>--%>
<%--    <%--%>
<%--        String studentId = (String) request.getAttribute("studentId");--%>
<%--        String error = (String) request.getAttribute("error");--%>
<%--        if (error != null) {--%>
<%--            out.println("<p>" + error + "</p>");--%>
<%--        } else {--%>
<%--            out.println("<p>未知错误</p>");--%>
<%--        }--%>
<%--    %>--%>
<%--    <button onclick="window.location.href='welcome.jsp?studentId=<%=studentId%>'">返回首页</button>--%>
<%--</div>--%>
<%--</body>--%>
<%--</html>--%>


<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>错误</title>
    <style>
        :root {
            --primary-color: #4361ee;
            --secondary-color: #3a0ca3;
            --error-color: #f72585;
            --light-color: #f8f9fa;
            --dark-color: #212529;
            --border-radius: 12px;
            --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
            --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        body {
            background-color: #f5f7ff;
            color: var(--dark-color);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 20px;
        }

        .error-container {
            max-width: 600px;
            width: 100%;
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            overflow: hidden;
            position: relative;
        }

        .error-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 6px;
            background: var(--error-color);
        }

        .error-content {
            padding: 40px;
            text-align: center;
        }

        .error-icon {
            font-size: 72px;
            color: var(--error-color);
            margin-bottom: 20px;
        }

        h2 {
            color: var(--error-color);
            font-size: 28px;
            margin-bottom: 20px;
            position: relative;
            padding-bottom: 15px;
        }

        h2::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 3px;
            background: var(--error-color);
            border-radius: 3px;
        }

        .error-message {
            font-size: 18px;
            line-height: 1.6;
            margin-bottom: 30px;
            color: #555;
        }

        .home-btn {
            display: inline-block;
            padding: 14px 28px;
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius);
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            text-decoration: none;
            box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
        }

        .home-btn:hover {
            background: var(--secondary-color);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
        }

        @media (max-width: 768px) {
            .error-content {
                padding: 30px 20px;
            }

            .error-icon {
                font-size: 60px;
            }

            h2 {
                font-size: 24px;
            }

            .error-message {
                font-size: 16px;
            }
        }
    </style>
</head>
<body>
<div class="error-container">
    <div class="error-content">
        <div class="error-icon">⚠️</div>
        <h2>发生错误！</h2>
        <div class="error-message">
            <%
                String studentId = (String) request.getAttribute("studentId");
                String error = (String) request.getAttribute("error");
                if (error != null) {
                    out.println("<p>" + error + "</p>");
                } else {
                    out.println("<p>抱歉，发生了未知错误</p>");
                }
            %>
        </div>
        <a href="welcome.jsp?studentId=<%=studentId%>" class="home-btn">返回首页</a>
    </div>
</div>
</body>
</html>